Title Banner

Previous Book Contents Book Index Next

Inside Macintosh: QuickDraw GX Printing Extensions and Drivers /
Chapter 4 - Printing Messages / Printing Messages Reference
Printing Messages / Device Communications Messages


GXDumpBuffer

QuickDraw GX sends the GXDumpBuffer message in order to write to the device the data in the buffers. You can override the GXDumpBuffer message to process data and buffers in your own way. Your override of the GXDumpBuffer message must match the following formal declaration:

OSErr MyDumpBuffer (gxPrintingBuffer *aPrintingBuffer);
aPrintingBuffer
A pointer to the printing buffer structure that defines the buffer to send
to the device.
function result
An error code. The value noErr indicates that the operation was successful.
DESCRIPTION
QuickDraw GX sends the GXDumpBuffer message to write data to the device. It sends the message when any one of the buffers is full and data must be sent.

The default implementation of this message calls the asynchronous I/O functions of the Macintosh system software to send the buffer to the device. The default implementation then sends the requested buffer to the device using PAP, serial, or not-connected communications, depending on what you specified in your printing extension or printer driver resources. You can override this message to process data and buffers in your own way.

SPECIAL CONSIDERATIONS
You can send the GXDumpBuffer message yourself if you are implementing your own buffering scheme.

If you are implementing your own I/O mechanism, you need to perform a total override of the GXDumpBuffer message. Otherwise, you need to forward this message to the other printing message handlers.

If you override the GXDumpBuffer message, you must also override the GXFreeBuffer message.

RESULT CODES
gxSegmentLoadFailedErrA required code segment could not be found,
or there was not enough memory to load it.
gxPrUserAbortErrThe user has canceled printing.
The default implementation of the GXDumpBuffer message can also return the communications errors that are listed in Table 4-2 on page 4-42.

SEE ALSO
The GXFreeBuffer message is described in the next section.

The printing buffer structure is described on page 4-11.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996




Navigation graphic, see text links

Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help